"""djangoProject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
# 导入了一个py文件
from app01 import views

urlpatterns = [
    # path('admin/', admin.site.urls),
    # 用户访问www.xxx.com/index/ ->就会执行后边这个函数
    # 函数一般写在app的views中，需要进行导入操作，用户
    path('index/', views.index),
    path('user/list/', views.user_list),
    path('user/add/', views.user_add),
    path('user/tpl/', views.tpl),
    # 消息中心，测试Django的模板语法
    path('news/', views.news),
    # 测试请求和响应
    path('somethings/', views.something),
    # 用户登录案例的URL

    path('userlogin/', views.userlogin),
    path('orm/', views.orm),
    # 用户管理的案例 - 显示用户列表
    path('info/list/', views.info_list),
    # 用户管理的案例 - 添加用户
    path('info/add/', views.info_add),
    # 用户管理的案例 - 修改用户
    path('info/update/', views.info_update),
    # 用户管理的案例 - 删除用户
    path('info/del/', views.info_del),

]
